package top.kaoshanji.p2ch10a;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * 代码清单-p2ch10a-311页a：静态域的初始化顺序的示例
 * author kaoshanji
 * ^_^
 * create time 2025/2/2 16:55
 */
public class StaticOrder {

    private static final Logger logger = LogManager.getLogger(StaticOrder.class);

    public static int X = 20;
    public static int Y = 2 * X;

    static {
        X = 30;
    }

    public static void main(String[] args) {
        logger.info("...代码清单-p2ch10a-311页a：静态域的初始化顺序的示例...");
        logger.info("...Y的值：{}...", Y);

    }



}
